package service.menu;


import client.LoginClient;
import client.MnueClient;
import dao.search.RoomMessageSearchDao;
import service.LoginUserService;
import java.sql.SQLException;
import java.text.ParseException;

import java.util.Scanner;

public class ManagerMenuService {

    MnueClient mc = new MnueClient();
    public void managerMenu() throws SQLException, ParseException {
        Scanner sc = new Scanner(System.in);

        ManagerMenuService mms = new ManagerMenuService();

        System.out.println("----------尊敬的管理员，欢迎进入管理系统---------");
        System.out.println("请根据提示信息进行菜单的选择：");
        System.out.println("1.房间管理\n2.住宿管理\n3.班级管理\n4.信息查询\n5.数据统计\n6.费用管理\n7.系统管理\n输入0返回上层菜单");
        int choice = sc.nextInt();
        switch (choice) {
            case 1:
                mc.roomManageList();
                break;
            case 2:
                mc.stayMnanageList();
                break;
            case 3:
                mc.classMnanageList();
            case 4:
                PersonMenuService ms = new PersonMenuService();
                ms.messageSys();
                System.out.println("输入0返回上一层菜单");
                int y = sc.nextInt();
                if (0 == y) {
                    managerMenu();
                }
                break;
            case 5:
                RoomMessageSearchDao rmsd = new RoomMessageSearchDao();
                rmsd.AllPeople();
                rmsd.AllRoom();
                rmsd.AllRoomPeople();
                System.out.println("输入0返回上一层菜单");
                int y1 = sc.nextInt();
                if (0 == y1) {
                    managerMenu();
                }

                break;
            case 6:
                mc.moneyMnanageList();

                break;
            case 7:
                LoginUserService lus = new LoginUserService();
                lus.loginUsers();
                break;
            default:
                LoginClient lc = new LoginClient();
                lc.Login();
                break;

        }
    }


}
